﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoreShop.Model
{
    /// <summary>
    /// 前台单据明细表
    /// </summary>
    public partial class corecmsfoodorderdetail
    {
        /// <summary>
        /// 序列
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
        public Int64 id { get; set; }

        /// <summary>
        /// 订单id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "orderId", IsNullable = false)]
        public Int64 orderId { get; set; }

        /// <summary>
        /// 本单行号
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "rowId", IsNullable = true)]
        public Int32? rowId { get; set; }

        /// <summary>
        /// 商品ID
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "foodId")]
        public Int64 foodId { get; set; }

        /// <summary>
        /// 规格ID
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "foodSpecId")]
        public Int64 foodSpecId { get; set; }

        /// <summary>
        /// 商品编码
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "number", IsNullable = false)]
        public String number { get; set; }
        /// <summary>
        /// 商品条码
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "code", IsNullable = false)]
        public String code { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "name", IsNullable = false)]
        public String name { get; set; }

        /// <summary>
        /// 规格名称
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "specName", IsNullable = false)]
        public String specName { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "unitName", IsNullable = false)]
        public String unitName { get; set; }
        /// <summary>
        /// 换算系数
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "convert", IsNullable = true)]
        public Decimal? convert { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "quantity")]
        public Decimal quantity { get; set; }

        /// <summary>
        /// 原价
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "price")]
        public Decimal price { get; set; }

        /// <summary>
        /// 实价
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "realPrice")]
        public Decimal realPrice { get; set; }

        /// <summary>
        /// 折扣
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "discount")]
        public Decimal discount { get; set; }

        /// <summary>
        /// 原金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "amount")]
        public Decimal amount { get; set; }

        /// <summary>
        /// 实收金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "realAmount")]
        public Decimal realAmount { get; set; }

        /// <summary>
        /// 做法金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "taskAmount")]
        public Decimal taskAmount { get; set; }

        /// <summary>
        /// 加料金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "feedAmount")]
        public Decimal feedAmount { get; set; }

        /// <summary>
        /// 小计(优惠前)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "allAmount1")]
        public Decimal allAmount1 { get; set; }
        /// <summary>
        /// 优惠金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "reduceAmount")]
        public decimal reduceAmount { get; set; }

        /// <summary>
        /// 小计(优惠后)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "allAmount")]
        public Decimal allAmount { get; set; }

        /// <summary>
        /// 成本价
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "costPrice", IsNullable = true)]
        public Decimal? costPrice { get; set; }

        /// <summary>
        /// 套菜内品执行价格
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "setPrice", IsNullable = true)]
        public Decimal? setPrice { get; set; } = 0;

        /// <summary>
        /// 套餐数量
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "foodPackQuantity")]
        public Decimal foodPackQuantity { get; set; }

        /// <summary>
        /// 原Id,corecmsfoodordering.sourceId=corecmsfoodordering.sourceId)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sourceId", IsNullable = true)]
        public Int64 sourceId { get; set; }

        /// <summary>
        /// 购买限制数量
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "limitBuyQty")]
        public Decimal limitBuyQty { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "itemType")]
        public Int32 itemType { get; set; }

        /// <summary>
        /// 销售类型(1正常，0赠送,-1退货，2打折)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "dataType")]
        public Int32 dataType { get; set; }

        /// <summary>
        /// 商品数(1商品，0套菜)
        /// 因为计算商品数，所以不能有其它数值
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "itemCount")]
        public Int32 itemCount { get; set; }

        /// <summary>
        /// 餐套主菜Id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "foodPackId", IsNullable = true)]
        public Int64 foodPackId { get; set; }

        /// <summary>
        /// 商品分类Id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "foodTypeId", IsNullable = true)]
        public Int64 foodTypeId { get; set; }

        /// <summary>
        /// 打包标记
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "parcel", IsNullable = true)]
        public String parcel { get; set; }


        /// <summary>
        /// 做法名称
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "taskTitle", IsNullable = true)]
        public String taskTitle { get; set; }

        /// <summary>
        /// 加料名称
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "feedTitle", IsNullable = true)]
        public String feedTitle { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "remark", IsNullable = true)]
        public String remark { get; set; }

        /// <summary>
        /// 下单人Id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "billerId", IsNullable = true)]
        public long billerId { get; set; }
    }
}
